package com.nmsl.membership.service.impl;

import java.util.List;

import com.nmsl.membership.domain.Membership;
import com.nmsl.membership.domain.lyPatient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.nmsl.membership.mapper.MembershipLevelMapper;
import com.nmsl.membership.domain.MembershipLevel;
import com.nmsl.membership.service.IMembershipLevelService;
import org.springframework.transaction.annotation.Transactional;

/**
 * 会员设置Service业务层处理
 * 
 * @author liuyan
 * @date 2025-02-15
 */
//会员设置
@Service
public class MembershipLevelServiceImpl implements IMembershipLevelService 
{
    @Autowired
    private MembershipLevelMapper membershipLevelMapper;

    /**
     * 查询会员设置
     * 
     * @param levelId 会员设置主键
     * @return 会员设置
     */
    @Override
    public MembershipLevel selectMembershipLevelByLevelId(Long levelId)
    {
        return membershipLevelMapper.selectMembershipLevelByLevelId(levelId);
    }

    /**
     * 查询会员设置列表
     * 
     * @param membershipLevel 会员设置
     * @return 会员设置
     */
    @Override
    public List<MembershipLevel> selectMembershipLevelList(MembershipLevel membershipLevel)
    {
        return membershipLevelMapper.selectMembershipLevelList(membershipLevel);
    }

    /**
     * 新增会员设置
     *
     * @param membershipLevel 会员设置
     * @return 结果
     */

    @Override
    public int insertMembershipLevel(MembershipLevel membershipLevel)
    {
        return membershipLevelMapper.insertMembershipLevel(membershipLevel);
    }

    /**
     * 修改会员设置
     * 
     * @param membershipLevel 会员设置
     * @return 结果
     */
    @Override
    public int updateMembershipLevel(MembershipLevel membershipLevel)
    {
        return membershipLevelMapper.updateMembershipLevel(membershipLevel);
    }

    /**
     * 批量删除会员设置
     * 
     * @param levelIds 需要删除的会员设置主键
     * @return 结果
     */
    @Override
    public int deleteMembershipLevelByLevelIds(Long[] levelIds)
    {
        return membershipLevelMapper.deleteMembershipLevelByLevelIds(levelIds);
    }

    /**
     * 删除会员设置信息
     * 
     * @param levelId 会员设置主键
     * @return 结果
     */
    @Override
    public int deleteMembershipLevelByLevelId(Long levelId)
    {
        return membershipLevelMapper.deleteMembershipLevelByLevelId(levelId);
    }
}
